const Router = require('@koa/router');
const fun = require('../controller/system/login.controller');
const config = require('../config');
const router = new Router({ prefix: config.ADMIN_PREFIX });

// 获取验证码是否启用
router.get('/captcha/status', fun.captchaStatus);

//获取滑块拼图验证码
router.post('/captcha/get', fun.getCaptcha);

// 校验滑块拼图验证码
router.post('/captcha/check', fun.verifyCaptcha);

//用户登录
router.post('/auth/login', fun.login);

//用户退出
router.post('/auth/logout', fun.logout);

module.exports = router;
